/**
 * Copyright (c) 2009-2011, chunquedong(YangJiandong)
 * 
 * This file is part of ChunMap project
 * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE(Version >=3)
 * 
 * History:
 *     2010-05-05  Jed Young  Creation
 */
package chunmap.data.index.database;

public class GridMeta {
	private int level;
	private int scale;
	private boolean hasData;
	@Override
	public String toString() {
		return "GridSet [hasData=" + hasData + ", level=" + level + ", scale="
				+ scale + "]";
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + (hasData ? 1231 : 1237);
		result = prime * result + level;
		result = prime * result + scale;
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		GridMeta other = (GridMeta) obj;
		if (hasData != other.hasData)
			return false;
		if (level != other.level)
			return false;
		if (scale != other.scale)
			return false;
		return true;
	}
	public int getLevel() {
		return level;
	}
	public void setLevel(int level) {
		this.level = level;
	}
	public int getScale() {
		return scale;
	}
	public void setScale(int scale) {
		this.scale = scale;
	}
	public boolean getHasData() {
		return hasData;
	}
	public void setHasData(boolean hasData) {
		this.hasData = hasData;
	}
}